#ifndef _SATCODX_INCLUDED_
#define _SATCODX_INCLUDED_


struct satcdx_buf
{
	UINT32 buf_len;
	UINT8* buf_addr;
	UINT32 data_len;
	UINT32 flag;/* 0-not need to free 1 - malloced*/
};

typedef enum
{
	SATCODX_EVENT_DOWNLOAD_WAITDATA = 0,
	SATCODX_EVENT_DOWNLOAD_GETDATA,
	SATCODX_EVENT_DOWNLOAD_END,
	SATCODX_EVENT_PARSE_ADDSATTP,
	SATCODX_EVENT_PARSE_ADDTP,
	SATCODX_EVENT_PARSE_CHANNEL,
	SATCODX_EVENT_PARSE_END
}SATCODX_EVENT_T;


typedef INT32 (satcodx_proc_callback)(UINT32 type,UINT32 para,S_NODE* snode, T_NODE* tnode, P_NODE* pnode);

INT32 satcodx_download(struct satcdx_buf* bufs, UINT32 buf_cnt, satcodx_proc_callback callback);
INT32 satcodx_parse(struct satcdx_buf* bufs, UINT32 buf_cnt, satcodx_proc_callback callback);

#endif

